

<?php //if (!empty($items)): ?>
	<h3><?php echo lang('dataman.user'); ?></h3>
	
	<table border="0" class="table-list">
		<thead>
			<tr>
				<th><?php echo lang('dataman.content.id'); ?></th>
				<th><?php echo lang('dataman.user.userID'); ?></th>
				<th><?php echo lang('dataman.user.userName'); ?></th>
				<th><?php echo lang('dataman.user.sex'); ?></th>
				<th><?php echo lang('dataman.user.post'); ?></th>
				<th><?php echo lang('dataman.user.reject'); ?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="6">
					<div class="inner"><?php echo $pagination; ?></div>
				</td>
			</tr>
		</tfoot>
		<tbody>
	 	<?php foreach( $contents as $user ): ?>
			<tr>
				<td><?php echo $user->id; ?></td>
				<td><?php echo $user->fb_id  ; ?></td>
				<td><?php echo $user->name ; ?></td>
				<td><?php echo $user->gender ; ?></td>
				<td><?php echo anchor('admin/dataman/user_post/'. $user->id,lang('dataman.user.post'));?> </td>	
				<?php $checked= ($user->restrict_access == 1)? ' checked="checked"':''; ?>
				<td><input type="checkbox" onclick="reject(this,<?php echo $user->id;?>)" <?php echo $checked;?> /></td>	
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>

	<script type="text/javascript">
		function reject(t,id){
			var check = ( t.checked )? 1:0;
			jQuery.post(BASE_URI+'admin/dataman/aj_reject_user',{reject:check,id:id},function(res){
				alert(res);
			});
		}
	</script>
